<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script src="./jquery-3.4.1.min.js"></script>
  <script>
    // json形式的对象 和json数据的区别     json数据key值有""
    var obj = { //json对象
      "type": "衣服",
      "color": "绿色",
      "price": "1"
    }
    // 字符串类型对象
    // var str = "type=衣服&color=绿色&price=1"
    // $.param(obj) 参数序列化"type=衣服&color=绿色&price=1"
    var str = $.param(obj)
    console.log(str)


  </script>
</body>

</html>